package com;

import java.util.Random;

/**
 * Created by bruce on 2016/5/22.
 */
public class Salts {

    public static final int SALT_LENGTH = 16;

    public static byte[] nextSalt() {
        return nextSalt(SALT_LENGTH);
    }

    public static byte[] nextSalt(int salt_length) {
        byte[] salt = new byte[salt_length];
        Random rand = new Random();
        rand.nextBytes(salt);
        return salt;
    }

}
